home *** CD-ROM | disk | FTP | other *** search
- on adjustregpoints dX, dY
- repeat with X = 3 to 12
- member(X, "bottles_g").regPoint = member(X, "bottles_g").regPoint + point(dX, dY)
- end repeat
- end
-
- on playTrack
- global gSoundTrack, gCurrentSong, gFileSep, gSongList, gMusicChan, gMuted
- if gMuted then
- exit
- end if
- if inBonusMode() then
- playBonusSound(gMusicChan, gSoundTrack)
- else
- gSoundTrack = getAt(gSongList, gCurrentSong)
- soundPlayfile(gMusicChan, basePath() & "music" & gFileSep & gSoundTrack)
- end if
- end
-
- on importSound newSound
- repeat with X = 1 to the number of castMembers of castLib "bonussound"
- thisOne = member(X, "bonussound")
- if thisOne.type = #sound then
- if thisOne.fileName <> EMPTY then
- put "Importing" && thisOne.name
- oldName = thisOne.name
- importFileInto(thisOne, thisOne.fileName)
- thisOne.name = oldName
- end if
- end if
- end repeat
- end
-
- on setLevelCurrentSong
- global gGameLevel, gSongList, gMode, gDemoVersion
- case gGameLevel of
- VOID, 0, 1:
- if gDemoVersion then
- thisList = ["groovy"]
- else
- thisList = ["groovy", "smash"]
- end if
- 2:
- if gDemoVersion then
- thisList = ["samboni"]
- else
- thisList = ["mambo"]
- end if
- otherwise:
- if gDemoVersion then
- thisList = ["samboni"]
- else
- thisList = ["samboni", "funkey"]
- end if
- end case
- currentSong(0, getOne(gSongList, randomFromList(thisList)))
- playTrack()
- end
-
- on currentSong delta, absolute
- global gCurrentSong, gJukeHilight, gSongList, gCharacterSprites
- oldSong = gCurrentSong
- if voidp(gCurrentSong) then
- gCurrentSong = 1
- end if
- maxSongs = count(gSongList)
- if absolute then
- gCurrentSong = max(1, min(absolute, maxSongs))
- else
- if delta < 0 then
- if gCurrentSong > 1 then
- gCurrentSong = gCurrentSong + delta
- else
- gCurrentSong = maxSongs
- end if
- else
- if gCurrentSong < maxSongs then
- gCurrentSong = gCurrentSong + delta
- else
- gCurrentSong = 1
- end if
- end if
- end if
- if oldSong <> gCurrentSong then
- playTrack()
- end if
- repeat with X in gCharacterSprites
- sendSprite(X, #musicCheck)
- end repeat
- sendSprite(gJukeHilight, #mMoveHilite)
- end
-